<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="id1">

    </div>

<script>
  var id1= document.getElementById("id1");
  //innerText 修改文本值
  id1.innerText='123'
  //修改超文本
  id1.innerHTML='<strong>123</strong>>'
</script>
</body>
</html>